package com.fakeco.fakeproduct;

import static org.junit.Assert.*;

import org.junit.Ignore;
import org.junit.Test;

public class TestJUnit4TestCase
{
  private static final String KEY = TestJUnit4TestCase.class.getName()+"TOGGLE";
  private static final String ENABLED = "ENABLED";

  @Test
  public void shouldPass() throws Exception
  {
  }
  
  @Test
  public void shouldFailIfPropertyIsSet() throws Exception
  {
    // This is done so Eclipse doesn't get confused and fail because of this test.
    if (ENABLED.equals(System.getProperty(KEY)))
      fail("Test Failed");
  }

  public static void enable()
  {
    System.setProperty(KEY, ENABLED);
  }
  
  public static void disable()
  {
    System.clearProperty(KEY);
  }
}
